package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.md.mdactivity.MdActivityQuery;
import com.uzai.console.entity.MdActivity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface MdActivityMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(MdActivity record);

    int insertSelective(MdActivity record);

    MdActivity selectById(@Param("id") Long id, @Param("merId") Long merId);

    MdActivity selectByActivityId(@Param("activityId") Long activityId, @Param("merId") Long merId);

    Long findMaxActivityId();

    int updateByIdSelective(MdActivity record);

    int updateById(MdActivity record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<MdActivity> findByList(Page<MdActivity> page, @Param("query") MdActivityQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<MdActivity> findByList(@Param("query") MdActivityQuery query);
}